package com.lanxin.xx.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lanxin.xx.entity.XxDuanxiaoxi;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lanxin.xx.vo.Duanxiaoxi;

import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zyq
 * @since 2025-07-26
 */
public interface IXxDuanxiaoxiService extends IService<XxDuanxiaoxi> {

    //发送短消息
    public Integer sendMsg(XxDuanxiaoxi duanxiaoxi, List<Integer> eids);

    //列表短消息+分页+收件人是自己
    public Page<Duanxiaoxi> listDuanxiaoxi(Page<Duanxiaoxi> page,
                                             String biaoti,
                                             String empName,
                                             LocalDate startDate,
                                             LocalDate endDate,
                                             Integer jieshouren);

    //根据id获取收件箱详情
    public Duanxiaoxi getDuanxiaoxiById(Integer oid);

    //列表已发消息+分页+发送人是自己
    public Page<XxDuanxiaoxi> allMsg(Page<XxDuanxiaoxi> page,
                                     String biaoti,
                                     String empName,
                                     LocalDate startDate,
                                     LocalDate endDate,
                                     Integer creator);

    // 获取指定用户的最近N条短消息
    List<Duanxiaoxi> getRecentMsgs(Integer empOid, int limit);

}
